package com.yueshang.neuron.core.warpper;


import com.yueshang.framework.base.BaseControllerWarpper;
import com.yueshang.neuron.core.factory.ConstantFactory;
import com.yueshang.neuron.modular.system.model.User;

import java.util.List;
import java.util.Map;

/**
 * 用户管理的包装类
 *
 * @author shililu
 * @date 2018-08-30
 */
public class UserWarpper extends BaseControllerWarpper {

    public UserWarpper(List<Map<String, Object>> list) {
        super(list);
    }

    public UserWarpper(Object object) {
        super(object);
    }

    @Override
    public void warpTheMap(Map<String, Object> map) {
        map.put("sexName", ConstantFactory.me().getSexName((Integer) map.get("sex")));
        map.put("statusName", ConstantFactory.me().getStatusName((Integer) map.get("status")));
        map.put("jobStatusName", ConstantFactory.me().getJobStatusName((Integer) map.get("job_status")));
        map.put("deptName",ConstantFactory.me().getDeptNameByUserId((String)map.get("id")));
        map.put("deptManageName",ConstantFactory.me().getManageDeptNameByUserId((String)map.get("id")));
        map.put("assistantName",ConstantFactory.me().getAssistantNameByUserId((String)map.get("id")));
    }

    //todo
    protected void warpTheObject(Object o) {

    }
}
